#coding=utf-8
from uliweb.orm import *
from uliweb.utils.common import get_var
from uliweb.i18n import ugettext_lazy as _

def get_modified_user():
    from uliweb import request
    
    return request.user.id

class Link(Model):
    __verbose_name__ = u'链接'
    
    name = Field(str, max_length=255, verbose_name='链接名称', required=True)
    desc = Field(str, max_length=255, verbose_name='链接说明')
    order = Field(int, verbose_name='顺序号')
    link = Field(str, max_length=255, verbose_name='链接', required=True)

    class Table:
        fields = [
            {'name':'name', 'width':200},
            {'name':'desc', 'width':200},
            {'name':'order', 'width':60},
            {'name':'link', 'width':200},
            {'name':'action', 'width':100, 'verbose_name':'动作'},
        ]